<?php
/**
 * Created by PhpStorm.
 * User: stupboy
 * Date: 2018/4/16
 * Time: 8:05
 * Mail:87658989@qq.com
 */

namespace app\cron\controller;


use app\base\service\Redis;

class Mail
{
    public function sendDebugMail(){
        $redis  = Redis::getInstance();
        $string = '';
        do{
            $ret = $redis->pop('car_mail_debug');
            $arr = unserialize($ret);
            $string .= $arr['title'].'-'.$arr['content'].'<br>';
        }while($redis->lLen('car_mail_debug'));
        strlen($string)>5 && (new \app\base\service\Mail())->send('Bug定时反馈',$string);
    }
}